<?php

namespace App\Http\Validate\OpenShop\SiteLocation;

use App\Exceptions\CustomValidateException;
use App\Http\Validate\AbstractBaseValidate;
use App\Http\Validate\BaseValidate;
use Illuminate\Support\MessageBag;
use Illuminate\Validation\ValidationException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

/**
 * [ 提交选址 ] - 校验规则
 *
 * @CustomerAnalysisValidate
 * @package App\Http\Controllers
 * @date 2022/04/26 02:35:56
 * @author huang
 */
class ShopValidate extends AbstractBaseValidate
{
    function getRules(): array
    {
        // TODO: Implement getRules() method.
        return [];
    }

    function getAttributes(): array
    {
        // TODO: Implement getAttributes() method.
        return [];
    }

    function registerValidateRules(): void
    {
        // TODO: Implement registerValidateRules() method.
    }

    function getMessages(): array
    {
        // TODO: Implement getMessages() method.
        return [];
    }

    /**
     * 城市门店列表
     *
     * @param array $params
     * @return MessageBag|object
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     * @throws ValidationException
     */
    public static function cityShopValidate(array $params)
    {
        return self::getInstance()->validate(
            ["cityCode", 'shopName'],
            $params,
            [
                "cityCode" => "required|int|min:1",
                "shopName" => "string",
            ]
        );
    }
}
